﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

/// <summary>
///DBHelper 的摘要说明
/// </summary>
public class DBHelper
{
    private static SqlConnection connection = null;
    private static string strConnection = "server=localhost\\SQLEXPRESS;database=jashion;integrated security=sspi;uid=jashion;pwd=123456;";
    

	public DBHelper()
	{

	}

    public static SqlConnection getConnection() 
    {
        if (connection == null) 
        {
            connect();
        }
        return connection;
    }
    

    private static void connect() 
    {
        connection = new SqlConnection(strConnection);
        connection.Open();
    }
    


}
